<ui:composition template="template1.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="login">
        Herzlich Wilkommen Herr/Frau Muster!
    </ui:define>

	<ui:define name="products">
		<h4>Produkte</h4>
		<h:form>
		Suche: <h:inputText value="#{searchProductsCtrl.sSearchString}"/> <h:commandButton action="#{searchProductsCtrl.search}" value="suchen"/> <br />
			<h:dataTable var="current" value="#{searchProductsCtrl.products}">

				<h:column>
					<h:outputText value="#{current.sTitle}" />
				</h:column>
				<h:column>
					<h:outputText value="#{current.iProductNr}" />
				</h:column>
				<h:column>
					<h:outputText value="#{current.sDescription}" escape="false"/>
				</h:column>
				<h:column>
					<h:inputText size="2" value="#{current.iQuantity}"/>
				</h:column>
				<h:column>
					<h:commandButton value="kaufen" action="#{orderCtrl.addToCard(current)}"/>
				</h:column>


			</h:dataTable>
		</h:form>
	</ui:define>
	
	<div id="leftNavi">
		<ui:insert name="content">Default content</ui:insert>
	</div>
</ui:composition>